<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv=content-type content="text/html; charset=utf-8" />
<link href="<%=path %>/css/admin.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.3.min.js"></script>
<script language=javascript>
	function expand(el) {
		$("")
		childobj = document.getElementById("child" + el);

		if (childobj.style.display == 'none') {
			childobj.style.display = 'block';
		} else {
			childobj.style.display = 'none';
		}
		return;
	}
</script>
</head>
<body>
	<table height="100%" cellspacing=0 cellpadding=0 width=170
		background=<%=path %>/img/menu_bg.jpg border=0>
		<tr>
			<td valign=top align=middle>
				<table cellspacing=0 cellpadding=0 width="100%" border=0>

					<tr>
						<td height=10></td>
					</tr>
				</table>
				
				<!-- 读取数据库文件 -->
				<s:iterator value="#session.topPrivilegeListmenu">
					<c:forEach var="p" items="${pids}">
				     <c:if test="${p == id}">
				<table cellspacing=0 cellpadding=0 width=150 border=0>
					<tr height=22>
						<td style="padding-left: 30px" background=<%=path %>/img/menu_bt.jpg><a
							class=menuparent onclick=expand(${id}) href="javascript:void(0);">${name}</a></td>
					</tr>
					<tr height=4>
						<td></td>
					</tr>
				</table>
				 </c:if>
				     </c:forEach>
				
				<!--显示子菜单 start  -->
				<table id=child${id}  style="" cellspacing=0 cellpadding=0
					width=150 border=0>
					<input type="hidden" name="" value="">
					<s:iterator value="children">
				 <c:forEach var="p" items="${pids}">
				  <c:if test="${p == id}">
					<tr height=20>
						<td align=middle width=30><img height=9
							src="<%=path %>/img/menu_icon.gif" width=9></td>
						<td><a class=menuchild href="${pageContext.request.contextPath}${url}" target=right>${name}</a></td>
					</tr>
					</c:if>
				</c:forEach>
				</s:iterator>
				</table>
				<!--显示子菜单 end  -->
				</s:iterator>
				<!-- 读取数据库配置 end  -->
				
					<!-- 读取数据库文件 start -->
					<!--application在这里不适用，假如添加了一个菜单之后，不能及时的相应，需要重启服务器，不好  -->
				 <%-- <s:iterator value="#application.topPrivilegeList">
					<s:if test="children.size()!=0">
					<c:forEach var="p" items="${pids}">
				     <c:if test="${p == id}">
				<table cellspacing=0 cellpadding=0 width=150 border=0>
					<tr height=22>
						<td style="padding-left: 30px" background=<%=path %>/img/menu_bt.jpg>
						<a class=menuparent onclick=expand(1) href="javascript:void(0);">${name}</a></td>
					</tr>
					<tr height=4>
						<td></td>
					</tr>
				</table>
				 </c:if>
				     </c:forEach>
				</s:if>
				
				<s:iterator value="children">
				 <c:forEach var="p" items="${pids}">
				  <c:if test="${p == id}">
				<table  style="" cellspacing=0 cellpadding=0
					width=150 border=0>
					<tr height=20>
						<td align=middle width=30><img height=9
							src="<%=path %>/img/menu_icon.gif" width=9></td>
						<td><a class=menuchild href="${pageContext.request.contextPath}${url}" target=right>${name}</a></td>
					</tr>
					
				</table>
				</c:if>
				</c:forEach>
				</s:iterator>
				</s:iterator> --%>
				
				<!--读取文件 end  -->	
			</td>
			<td width=1 bgcolor=#d1e6f7></td>
		</tr>
	</table>
	
	
	  
	
</body>
</html>



